package com.jnpf.consumer;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author  liuzhiqiang
 * @date 2024/11/14 15:32
 * @description: 事件类型
 */
@Getter
@AllArgsConstructor
public enum EventTypeEnum {

	/**
	 * 申请状态枚举
	 */
    CREATE(1, "发起事件"),
	END(2, "结束事件"),
	WITHDRAW(3, "撤回事件"),
	AGREE(4, "同意事件"),
	BACK(5, "退回事件"),
	TIMEOUT(7, "超时事件"),
	REMIND(8, "提醒事件"),
	TERMINATION(9, "终止事件"),
	HTTP(10, "HTTP事件"),
	SQL(11, "SQL事件"),
	CONDITION(12, "条件事件"),
	LOOK(13, "审批找人事件");

    private final Integer type;

    private final String desc;

	public static String getDesc(Integer type) {
		for (EventTypeEnum item : values()) {
			if (item.getType().equals(type)) {
				return item.getDesc();
			}
		}
		return null;
	}
}